package com.mmall.common;

import com.google.common.collect.Sets;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by root on 3/18/18.
 */
public class Const {

    public static  final String CURRENT_USER = "currentUser";

    public static  final String EMAIL = "email";

    public static final String USERNAME = "username";

    public interface Role {
        int ROLE_CUSTOMER = 0;
        int ROLE_ADMIN = 1;
    }

    public interface  Cart{
        int CHECKED = 1;
        int UN_CHECKED = 0;
        String LIMIT_NUM_FAIL = "LIMIT_NUM_FAIL";
        String LIMIT_NUM_SUCCESS = "LIMIT_NUM_SUCCESS";
    }

    public interface RedisCacheExTime {
        int REDIS_SESSION_EXTIME = 30 * 60;
        int REDIS_QUESTION_TOKEN = 12 * 60 * 60;
    }

    public static final Set PRODUCT_PRICE_DESC_ASC = Sets.newHashSet("price_desc","price_asc");

    public interface Status {
        boolean STATUS_VALID = true;
        boolean STATUS_INVALID = false;
    }
}
